<%@page import="com.qdu.dao.OrderDao"%>
<%@page import="com.qdu.impl.OrdersendingformImpl"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
    <head><title>（用户）管理购买历史（查看订单）</title>

        <link href=img/ys1.css type=text/css rel=stylesheet>
  </head>
        <%
        String message = (String)request.getAttribute("message");
                if(message == null){
                                message = "";
                }
                if (!message.trim().equals("")){
                        out.println("<script language='javascript'>");
                        out.println("alert('"+message+"');");
                        out.println("</script>");
                }
                request.removeAttribute("message");
                String name=(String)session.getAttribute("name");
                if(name!=null){
        %>
    <STYLE>
        #div0{
            width:100%;
            height:50px;
            background-color:#FFCCCC;
            position:fixed;
            z-index:10;
            margin:-10px -10px 0px -10px;
        }
        #top-page{
            float:right;
            height:10px;
            white-space:nowrap;
            margin:25px 0px 0px 0px;

        }	
        #logo{
            height:50px;
            width:50px;
            float:left;
        }

    </style>
    <BODY leftMargin=0 topMargin=0 bgColor=#F0FFFF>
        <div id="div0">
            <div id="logo">
                <img src="img/logo.jpg" style="width:100%;height:100%; margin-left:15%">
            </div>
           <div id="top-page" align="right" style="margin-right:5%">
                <div align=center>
                   <a href="/J02_T13_P04/index.jsp"><FONT color=#ffffff>首页</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/newbook.jsp"><FONT color=#ffffff>最新图书</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/fenlei.jsp"><FONT color=#ffffff>图书分类</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/allbooklist.jsp"><FONT color=#ffffff>全部图书</FONT></a><FONT color=#ffffff> │ </FONT>
                    <a href="/J02_T13_P04/admin/login.jsp" target=_blank><FONT color=#ffffff>管理入口</FONT></a>
                </div>
            </div>
        </div>
        <div align="center">
            <img src="img/top.jpg" width="779">
        </div>

    <TABLE cellSpacing=0 cellPadding=0 width=779 align=center  
           border=0>
        <TBODY>
            <TR>
                <TD align=center vAlign=top width=779 height=400>

                    <table bgcolor=#99cccc align=left width=100 border=0 height=400>
                       <tr>
                            <td align=center bordercolor="#CCFFFF" bgcolor="#99CCCC"><a href="upuser.jsp">个人信息</a></td>
                        </tr>
                        <tr>
                            <td align=center bordercolor="#FFFFFF" bgcolor="#99CCCC"><a href="gouwuche.jsp">我的购物车</a></td> 
                        </tr>
                        <tr>
                            <td align=center bordercolor="#FFFFFF" bgcolor="#99CCCC"><a href="shoucangjia.jsp">我的收藏夹</a></td> 
                        </tr>
                        <tr>
                            <td align=center bordercolor="#FFFFFF" bgcolor="#99CCCC"><a href="dingdan.jsp">我的定单</a></td>
                        </tr>
                        <tr>
                            <td align=center bordercolor="#FFFFFF" bgcolor="#99CCCC"><a href="index.jsp">返回首页</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                        <tr>
                            <td><a href="">&nbsp;</a></td>
                        </tr>
                    </table>


                    <form action="GouWu.jsp" method="post" name="form1" onSubmit="return check()">
                        <table align=right width=675 border=1 height=100>
                            <tr>
                                <td align="center" colspan="5"><br>
                                    <span class="STYLE3">我的定单</span></td>
                            </tr>
                            <tr>
                                <td align="center" height="30">序号</td>
                                <td align="center" height="30">定单号</td>
                                <td align="center" height="30">付款方式</td>
                                <td align="center" height="30">状态</td>
                                <td align="center" height="30">操作</td>
                            </tr>
                            <%
                            List list=new OrdersendingformImpl().getMyDD(name); 
                            if(!list.isEmpty()){
                            for(int i=0;i<list.size();i++){
                                    List list2=(List)list.get(i);
                            %>
                            <tr>
                                <td align="center" height="30"><%=i+1 %></td>
                                <td align="center" height="30"><a href="orderinfo.jsp?number=<%=list2.get(1).toString() %>" target="_blank"><%=list2.get(1).toString() %></a></td>
                                <td align="center" height="30"><%=list2.get(3).toString() %></td>
                                <td align="center" height="30"><%=list2.get(2).toString() %></td>
                                <td align="center" height="30">
                                    <%
                                            if(list2.get(2).toString().trim().equals("未发货")){
                                    %>
                                    <a href="GouWu.jsp?method=deldd&id=<%=list2.get(0).toString() %>">删除</a>
                                    <%
                                            }else{
                                    %>

                                    <%} %>
                                </td>
                            </tr>
                            <%
                                    }

                                    }
                            %>
                        </table>

                    </form>

                </TD>

            </TR></TBODY></TABLE>
 <br><br>
 <br><br>
 <br>
<div style="background:#CCFFFF;color:white;height:13;"align=center >2020-2030 网上书店  版权所有</div>
<div style="background:#FFCCCC;color:white;height:13;"align=center >2020-2030 网上书店  版权所有</div>
<div style="background:#CCFFFF;color:white;height:13;"align=center >2020-2030 网上书店  版权所有</div>
</BODY>
<%}else{response.sendRedirect("index.jsp");} %>
</HTML>

